﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="BlackEagleClient.Search" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="searchOptions">

        <asp:TextBox ID="tbxSearch" runat="server"></asp:TextBox>
        

        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" ValidationGroup="searchValidationGroup" /><br />
        <asp:RadioButtonList ID="rbSex" runat="server">
        <asp:ListItem Value="0">Female</asp:ListItem>
        <asp:ListItem Value="1" Selected="true">Male</asp:ListItem>
        </asp:RadioButtonList>
        <asp:RegularExpressionValidator id="rev2" runat="server"
     SetFocusOnError="True"
     ErrorMessage="Maximum length of name is 50 characters"
     Display="Dynamic"
     ControlToValidate="tbxSearch"
     CssClass="failureNotification"
     ValidationGroup="searchValidationGroup"
     ValidationExpression="^{1,50}$">
</asp:RegularExpressionValidator>
    </div>

    
    <asp:DataList ID="SearchResultList" runat="server">
    <ItemTemplate>
    
    <asp:HyperLink ID="HyperLink1"
     NavigateUrl='<%#"Profile.aspx?id=" + Eval("ID")%>'
     runat="server">
     <div id="searchResult">
     <img src="<%# CheckImg(((string)Eval("PictureUrl")), ((int)Eval("Sex")))  %>" alt="NO PIC" id="friendPic" width="40px" height="40px" />
     

        
       <%# Eval("Fnamn") %>&nbsp; <%# Eval("Enamn") %>
        
        </div>
        </asp:HyperLink>
        
        
        
    </ItemTemplate>
    </asp:DataList>
    
</asp:Content>
